package xiaolong.zhou.spring_demo.Home;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import xiaolong.zhou.spring_demo.Pojo.Login;
import xiaolong.zhou.spring_demo.Service.achieve.UserLoginAchieve;
import xiaolong.zhou.spring_demo.Utils.Result;

@Controller
@RequestMapping("/home")
@ResponseBody
@Slf4j
public class LoginController {
    @Autowired
    private UserLoginAchieve userLoginAchieve;
    @PostMapping("/login")
    public Result login(@RequestBody Login login)
    {
        return userLoginAchieve.login(login);
    }
}
